package pool;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.RunnableFuture;
import java.util.logging.LogRecord;
import java.util.logging.Logger;

import static java.util.logging.Level.FINE;

/**
 * @author: User
 * @date: 2022/11/9
 * @Description:此类用于xxx
 */
public class PrintInfoRunnable implements Runnable {

    public Logger logger = Logger.getLogger("PrintInfoRunnable");
    @Override
    public void run() {
        FileReader fileReader = null;
        try {
            fileReader = new FileReader("asrc/main/resources/test.txt");
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }
        char[] cbuf = new char[100];
        try {
            fileReader.read(cbuf, 0, 99);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        LogRecord record = new LogRecord(FINE, String.valueOf(cbuf));
        logger.log(record);
    }
}
